<div class="blazorise-codeblock">
<div class="html"><pre>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Button</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">DoWork</span><span class="quot">&quot;</span> <span class="htmlTagDelimiter">/&gt;</span>
</pre></div>
<div class="csharp"><pre>
<span class="atSign">&#64;</span>code
{
    [CascadingParameter]
    LoadingIndicator loadingIndicator;

    <span class="keyword">async</span> Task DoWork()
    {
        <span class="keyword">await</span> loadingIndicator.Show();
        
        <span class="comment">// do work ...</span>
        
        <span class="keyword">await</span> loadingIndicator.Hide();
    }
}
</pre></div>
</div>
